package com.concerneyes.pay.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.concerneyes.R;
import com.concerneyes.health.model.HealthDataModel;
import com.concerneyes.mine.model.MyAdressModel;
import com.concerneyes.mine.model.MyGlassManModel;

import common.BASE_Adapter;
import util.Util;

public class ChooseGlassesManAdapter extends BASE_Adapter<MyGlassManModel> {
    // 用于记录每个RadioButton的状态，并保证只可选一个
    public ChooseGlassesManAdapter(Context context) {
        super(context);
    }

    @Override
    public View createView(LayoutInflater inflater, final int position, View convertView, ViewGroup parent) {
        final Holder holder;
        if (convertView == null) {
            holder = new Holder();
            convertView = inflater.inflate(R.layout.adapter_my_glasses_man, null);
            holder.tv_name = (TextView) convertView.findViewById(R.id.tv_name);
            holder.tv_guanxi = (TextView) convertView.findViewById(R.id.tv_guanxi);
            convertView.setTag(holder);
        } else {
            holder = (Holder) convertView.getTag();
        }
        MyGlassManModel model = getItem(position);
		holder.tv_name.setText(model.getRealName());
        return convertView;
    }

    class Holder {
        TextView tv_name;
        TextView tv_guanxi;
    }
}
